# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=nose
pkgbase="python-${_realname}"
pkgname=("python-${_realname}")
pkgver=1.3.7
pkgrel=7
pkgdesc="A discovery-based unittest extension"
arch=('i686' 'x86_64')
license=('LGPL2.1')
url="https://nose.readthedocs.io/"
depends=("python-setuptools")
provides=("python3-${_realname}")
conflicts=("python3-${_realname}" "python2-${_realname}")
replaces=("python3-${_realname}")
source=("https://pypi.python.org/packages/source/n/nose/nose-${pkgver}.tar.gz")
sha256sums=('f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98')

prepare() {
  cd "${srcdir}/nose-${pkgver}"
  sed -i -e "s:man/man1:share/man/man1:g" setup.py
}

build() {
  cd "${srcdir}/nose-${pkgver}"
  /usr/bin/python setup.py build
}

package() {
  cd "${srcdir}/nose-${pkgver}"
  /usr/bin/python setup.py install --prefix=/usr --root="${pkgdir}" -O1
}